_gggg_eeee_tttt_ssss_oooo_cccc_kkkk_oooo_pppp_tttt and _ssss_eeee_tttt_ssss_oooo_cccc_kkkk_oooo_pppp_tttt manipulate _o_p_t_i_o_n_s associated with a socket.
Options may exist at multiple protocol levels; they are always present at
the uppermost socket level.
When manipulating socket options, the level at which the option resides
and the name of the option must be specified. To manipulate options at
the socket level, _l_e_v_e_l is specified as _SSSS_OOOO_LLLL______SSSS_OOOO_CCCC_KKKK_EEEE_TTTT. To manipulate
options at any other level, _l_e_v_e_l is the protocol number of the protocol
that controls the option. For example, to indicate that an option is to
be interpreted by the TCP protocol, _l_e_v_e_l is set to the TCP protocol
number [see _gggg_eeee_tttt_pppp_rrrr_oooo_tttt_oooo_eeee_nnnn_tttt(3N)].
The parameters _o_p_t_v_a_l and _o_p_t_l_e_n are used to access option values for
_ssss_eeee_tttt_ssss_oooo_cccc_kkkk_oooo_pppp_tttt. For _gggg_eeee_tttt_ssss_oooo_cccc_kkkk_oooo_pppp_tttt, they identify a buffer in which the value(s)
for the requested option(s) are to be returned. For _gggg_eeee_tttt_ssss_oooo_cccc_kkkk_oooo_pppp_tttt, _o_p_t_l_e_n
is a value-result parameter, initially containing the size of the buffer
pointed to by _o_p_t_v_a_l, and modified on return to indicate the actual size
of the value returned. If no option value is to be supplied or returned,
a 0 _o_p_t_v_a_l may be supplied.
_o_p_t_n_a_m_e and any specified options are passed uninterpreted to the
appropriate protocol module for interpretation. The include file
_ssss_yyyy_ssss_////_ssss_oooo_cccc_kkkk_eeee_tttt_...._hhhh contains definitions for the socket-level options described
below. Options at other protocol levels vary in format and name.
Most socket-level options take an _iiii_nnnn_tttt for _o_p_t_v_a_l. For _ssss_eeee_tttt_ssss_oooo_cccc_kkkk_oooo_pppp_tttt, the
_o_p_t_v_a_l parameter should be non-zero to enable a boolean option, or zero
if the option is to be disabled. _SSSS_OOOO______LLLL_IIII_NNNN_GGGG_EEEE_RRRR uses a _ssss_tttt_rrrr_uuuu_cccc_tttt _llll_iiii_nnnn_gggg_eeee_rrrr
parameter that specifies the desired state of the option and the linger
interval (see below). _ssss_tttt_rrrr_uuuu_cccc_tttt _llll_iiii_nnnn_gggg_eeee_rrrr is defined in
_SSSS_OOOO______DDDD_OOOO_NNNN_TTTT_RRRR_OOOO_UUUU_TTTT_EEEE toggle routing bypass for outgoing messages
_SSSS_OOOO______LLLL_IIII_NNNN_GGGG_EEEE_RRRR linger on close if data is present
_SSSS_OOOO______BBBB_RRRR_OOOO_AAAA_DDDD_CCCC_AAAA_SSSS_TTTT toggle permission to transmit broadcast messages
_SSSS_OOOO______OOOO_OOOO_BBBB_IIII_NNNN_LLLL_IIII_NNNN_EEEE toggle reception of out-of-band data in band
_SSSS_OOOO______SSSS_NNNN_DDDD_BBBB_UUUU_FFFF set buffer size for output
_SSSS_OOOO______RRRR_CCCC_VVVV_BBBB_UUUU_FFFF set buffer size for input
_SSSS_OOOO______TTTT_YYYY_PPPP_EEEE get the type of the socket (get only)
_SSSS_OOOO______EEEE_RRRR_RRRR_OOOO_RRRR get and clear error on the socket (get only)
_SSSS_OOOO______DDDD_EEEE_BBBB_UUUU_GGGG enables debugging in the underlying protocol modules.
_SSSS_OOOO______RRRR_EEEE_UUUU_SSSS_EEEE_AAAA_DDDD_DDDD_RRRR indicates that the rules used in validating addresses
supplied in a _bbbb_iiii_nnnn_dddd call should allow reuse of local addresses.
_SSSS_OOOO______KKKK_EEEE_EEEE_PPPP_AAAA_LLLL_IIII_VVVV_EEEE enables the periodic transmission of messages on a connected
socket. If the connected party fails to respond to these messages, the
connection is considered broken and processes using the socket are
notified using a _SSSS_IIII_GGGG_PPPP_IIII_PPPP_EEEE signal. _SSSS_OOOO______DDDD_OOOO_NNNN_TTTT_RRRR_OOOO_UUUU_TTTT_EEEE indicates that outgoing
messages should bypass the standard routing facilities. Instead,
messages are directed to the appropriate network interface according to
the network portion of the destination address.
_SSSS_OOOO______LLLL_IIII_NNNN_GGGG_EEEE_RRRR controls the action taken when unsent messages are queued on a
socket and a _cccc_llll_oooo_ssss_eeee is performed. If the socket promises reliable
delivery of data and _SSSS_OOOO______LLLL_IIII_NNNN_GGGG_EEEE_RRRR is set, the system will block the process
on the _cccc_llll_oooo_ssss_eeee attempt until it is able to transmit the data or until it
decides it is unable to deliver the information (a timeout period, termed
the linger interval, is specified in the _ssss_eeee_tttt_ssss_oooo_cccc_kkkk_oooo_pppp_tttt call when _SSSS_OOOO______LLLL_IIII_NNNN_GGGG_EEEE_RRRR
is requested). If _SSSS_OOOO______LLLL_IIII_NNNN_GGGG_EEEE_RRRR is disabled and a _cccc_llll_oooo_ssss_eeee is issued, the
system will process the _cccc_llll_oooo_ssss_eeee() in a manner that allows the process to
continue as quickly as possible.
The option _SSSS_OOOO______BBBB_RRRR_OOOO_AAAA_DDDD_CCCC_AAAA_SSSS_TTTT requests permission to send broadcast datagrams
on the socket. With protocols that support out-of-band data, the
_SSSS_OOOO______OOOO_OOOO_BBBB_IIII_NNNN_LLLL_IIII_NNNN_EEEE option requests that out-of-band data be placed in the
normal data input queue as received; it will then be accessible with _rrrr_eeee_cccc_vvvv
or _rrrr_eeee_aaaa_dddd calls without the _MMMM_SSSS_GGGG______OOOO_OOOO_BBBB flag. _SSSS_OOOO______SSSS_NNNN_DDDD_BBBB_UUUU_FFFF and _SSSS_OOOO______RRRR_CCCC_VVVV_BBBB_UUUU_FFFF are
options that adjust the normal buffer sizes allocated for output and
input buffers, respectively. The buffer size may be increased for high-
volume connections or may be decreased to limit the possible backlog of
incoming data. The system places an absolute limit on these values.
Finally, _SSSS_OOOO______TTTT_YYYY_PPPP_EEEE and _SSSS_OOOO______EEEE_RRRR_RRRR_OOOO_RRRR are options used only with _gggg_eeee_tttt_ssss_oooo_cccc_kkkk_oooo_pppp_tttt.
_SSSS_OOOO______TTTT_YYYY_PPPP_EEEE returns the type of the socket (for example, _SSSS_OOOO_CCCC_KKKK______SSSS_TTTT_RRRR_EEEE_AAAA_MMMM_)))). It is
useful for servers that inherit sockets on startup. _SSSS_OOOO______EEEE_RRRR_RRRR_OOOO_RRRR returns any
pending error on the socket and clears the error status. It may be used
to check for asynchronous errors on connected datagram sockets or for
other asynchronous errors.
RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
A _0000 is returned if the call succeeds, _----_1111 if it fails.